package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WaterWorkRecordMapper;
import com.ruoyi.system.domain.WaterWorkRecord;
import com.ruoyi.system.service.IWaterWorkRecordService;

/**
 * 意见信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-29
 */
@Service
public class WaterWorkRecordServiceImpl implements IWaterWorkRecordService 
{
    @Autowired
    private WaterWorkRecordMapper waterWorkRecordMapper;

    /**
     * 查询意见信息
     * 
     * @param id 意见信息主键
     * @return 意见信息
     */
    @Override
    public WaterWorkRecord selectWaterWorkRecordById(Long id)
    {
        return waterWorkRecordMapper.selectWaterWorkRecordById(id);
    }

    /**
     * 查询意见信息列表
     * 
     * @param waterWorkRecord 意见信息
     * @return 意见信息
     */
    @Override
    public List<WaterWorkRecord> selectWaterWorkRecordList(WaterWorkRecord waterWorkRecord)
    {
        return waterWorkRecordMapper.selectWaterWorkRecordList(waterWorkRecord);
    }

    /**
     * 新增意见信息
     * 
     * @param waterWorkRecord 意见信息
     * @return 结果
     */
    @Override
    public int insertWaterWorkRecord(WaterWorkRecord waterWorkRecord)
    {
        waterWorkRecord.setCreateTime(DateUtils.getNowDate());
        return waterWorkRecordMapper.insertWaterWorkRecord(waterWorkRecord);
    }

    /**
     * 修改意见信息
     * 
     * @param waterWorkRecord 意见信息
     * @return 结果
     */
    @Override
    public int updateWaterWorkRecord(WaterWorkRecord waterWorkRecord)
    {
        waterWorkRecord.setUpdateTime(DateUtils.getNowDate());
        return waterWorkRecordMapper.updateWaterWorkRecord(waterWorkRecord);
    }

    /**
     * 批量删除意见信息
     * 
     * @param ids 需要删除的意见信息主键
     * @return 结果
     */
    @Override
    public int deleteWaterWorkRecordByIds(Long[] ids)
    {
        return waterWorkRecordMapper.deleteWaterWorkRecordByIds(ids);
    }

    /**
     * 删除意见信息信息
     * 
     * @param id 意见信息主键
     * @return 结果
     */
    @Override
    public int deleteWaterWorkRecordById(Long id)
    {
        return waterWorkRecordMapper.deleteWaterWorkRecordById(id);
    }
}
